package com.swizipuremvc.core
{


	import org.puremvc.as3.multicore.core.Model;
	import org.puremvc.as3.multicore.interfaces.IModel;
	import org.puremvc.as3.multicore.interfaces.IProxy;

	public class ApplicationModel extends Model
	{
		private static var key:String;

		public function ApplicationModel(key:String)
		{
			key = key;
			super(key);
		}

		override public function registerProxy(proxy:IProxy):void
		{
			//injectionManager.processInjection(proxy);
			super.registerProxy(proxy);
		}

		/*private function get injectionManager():InjectionManager
		{
			return (ApplicationFacade.getInstance(key) as ApplicationFacade).injectionManager;
		}*/

		public static function getInstance(key:String):IModel
		{
			if (instanceMap[key] == null)
				instanceMap[key] = new Model(key);
			return instanceMap[key];
		}
	}
}
